@echo off
echo 停止并删除可能存在的MongoDB容器...
docker stop mongodb-gof23 2>nul
docker rm mongodb-gof23 2>nul

echo 启动MongoDB容器...
docker run --name mongodb-gof23 -p 27017:27017 -d mongo:latest
echo MongoDB已启动，地址: mongodb://localhost:27017/
echo 使用以下命令连接到容器:
echo docker exec -it mongodb-gof23 mongosh
echo.
echo Press any key to exit...
pause > nul 